package blow.sky.quoted.service;

import blow.sky.quoted.dao.UserInfoDao;
import blow.sky.quoted.entity.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName UserInfoService
 * @Description TODO
 * @Author 江志武
 * @Date 2021/6/3 11:23
 */
@Service
public class UserInfoService {
    @Autowired
    UserInfoDao userInfoDao;


    //填写公司信息
    public void getInfo(UserInfo info)
    {
        userInfoDao.save(info);
    }

    //返回公司信息
    public UserInfo info(String email)
    {
        return userInfoDao.findByEmail(email);
    }

    public List<UserInfo> getAll()
    {
        return userInfoDao.findAll();
    }
}
